.handsontable-editor-wrap {
  background-color: var(--td-bg-color-container);

  .content {
    position: absolute;
    top: 0;
    left: 0;
    right: 46px;
    bottom: 0;
    overflow: auto;
  }

  .side {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    padding: 7px;
  }
}

.handsontable-editor {
  color: var(--td-text-color-primary);

  thead {
    th {
      color: var(--td-text-color-primary);
      background-color: var(--kb-bg-color-component);
    }
  }

  tbody {
    th {
      color: var(--td-text-color-primary);
      background-color: var(--kb-bg-color-container);
    }

    td, tr {
      color: var(--td-text-color-primary);
      background-color: var(--kb-bg-color-container);
    }
  }

  tbody th.ht__highlight, thead th.ht__highlight {
    color: var(--td-text-color-primary);
    background-color: var(--kb-bg-color-component);
  }

}

.handsontable {
  tbody th.ht__highlight, thead th.ht__highlight {
    background-color: var(--kb-bg-color-component-active) !important;
  }
  tr {
    background-color: var(--kb-bg-color-component) !important;
  }
}

.htMenu {
  .htCore {
    color: var(--td-text-color-primary);
    background-color: var(--td-bg-color-component);

  }

  table tbody tr td {
    background-color: var(--td-bg-color-secondarycontainer) !important;

    &.htDisabled {
      color: var(--td-text-color-disabled);

      &:hover {
        background-color: var(--td-bg-color-secondarycontainer-hover);
      }
    }

    &.current {
      background-color: var(--td-bg-color-secondarycontainer-active) !important;
    }
  }

  .handsontable {
    tr {
      background-color: var(--td-bg-color-secondarycomponent);

      &:hover {
        background-color: var(--td-bg-color-container);
      }
    }

    .htUISelectCaption {
      background-color: var(--td-bg-color-secondarycomponent);
    }

    .htFiltersMenuValue .htUIMultipleSelectSearch input {
      background-color: var(--td-bg-color-secondarycomponent);
      color: var(--td-text-color-primary);
    }

    .htUIMultipleSelect .handsontable .htCore td:hover {
      background-color: var(--td-bg-color-secondarycontainer);

    }
  }

  .ht_master table td.htCustomMenuRenderer {
    background-color: var(--td-bg-color-secondarycontainer);
  }
}

.htContextMenu table tbody tr td {
  background-color: var(--td-bg-color-component) !important;
}

.handsontableInput {
  color: var(--td-text-color-primary);
  background-color: var(--td-bg-color-component);
}

